package com.slkj.web.controller.test;

import com.slkj.common.core.controller.BaseController;
import com.slkj.common.core.domain.entity.SysUser;
import com.slkj.common.core.page.TableDataInfo;
import com.slkj.test.domain.Stu;
import com.slkj.test.service.StuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Base64;
import java.util.List;

@Api("学生测试")
@RestController
@RequestMapping("/stu")
public class StuController extends BaseController {

    @Resource
    private StuService stuService;
    /**
     * 获取用户列表
     */
    @PreAuthorize("@ss.hasPermi('test:stu:list')")
    @GetMapping("/list")
    @ApiOperation("学生条件查询")
    public TableDataInfo list(Stu stu) {
        startPage();
       List<Stu> list= stuService.selectStuList(stu);
        return getDataTable(list);
    }
}
